package zuoy;
import java.util.Random;
import java.util.Scanner;

public class Task3 {
    public static void addstudentname (String[] students) {
        Scanner sc=new Scanner(System.in);
        for(int i=0;i<students.length;i++){
            System.out.println(""+(i+1)+"");
            students[i]= sc.next();
        }
    }

    public static void printstudentname (String[] students) {
        for(int i=0;i<students.length;i++){
            String name = students[i];
            System.out.println(""+(i+1)+""+name);
        }
    }

    public static String randomstudentname(String[] students) {
        int index = new Random ().nextInt(students.length);
        String name = students[index];
        return name;
    }

    public static void main(String[] args) {
        System.out.println("");
        String[] students = new String[3];
        addstudentname(students);
        printstudentname(students);
        String randomname = randomstudentname(students);
        System.out.println(""+randomname);
    }
}
